# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName : zsj.py
# @Time     : 2024/4/25 22:18
# @Author   : Robot-Zsj
"""
description:

i:
3
5
1 2 3 4 5

o:
6
"""

maxCount = int(input())
n = int(input())
tasks = list(map(int, input().split()))


def getResult():
    time = 0
    remain = 0

    for task in tasks:
        if task + remain > maxCount:
            remain = task + remain - maxCount
        else:
            remain = 0
        time += 1

    while remain > 0:
        remain -= maxCount
        time += 1

    return time


print(getResult())
